#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

int n, x, y;

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    int T;
    scanf("%d", &T);
    while(T--){
        scanf("%d%d%d", &n, &x, &y);
        if(x != 0 && y != 0){
            printf("-1\n");
            continue;
        }

        if(x == 0 && y == 0){
            printf("-1\n");
            continue;
        }

        int k = (x == 0) ? y : x;

        if((n - 1) % k){
            printf("-1\n");
            continue;
        }

        if((n - 1) == k){
            for(int i = 1; i <= n - 1; i ++){
                printf("1 ");
            }
            printf("\n");
        }else{
            for(int i = 1; i <= k; i ++){
                printf("1 ");
            }
            int fo = 1 + k + 1;
            for(int i = 1; i <= n - 1 - k;){
                for(int p = 1; p <= k; p ++){
                    printf("%d ", fo);
                }
                fo += k;
                i += k;
            }
            printf("\n");
        }

    }

    return 0;
}